<%= form_for [refinery, :menus, :admin, @menu], html: { id: 'menu_form' } do |f| %>
  <div class='field'>
    <%= f.label :title %>
    <%= f.text_field :title, class: "larger widest" %>
  </div>
  <div id='links-container'>

    <%= render '/refinery/admin/error_messages',
               :object => @menu,
               :include_object_name => true %>


    <ul id="sortable_list">
      <% if @menu_links.present? %>
        <% @menu_links.each do |menu_link|  %>
          <%= render partial: 'refinery/menus/admin/menu_links/menu_link', object: menu_link %>
        <% end %>
      <% else %>
        <li class='pp-placeholder' id="menu_link">
          <%# We need a div here so we don't get a js error for a empty list %>
          <div><%= t('.no_links') %></div>
        </li>
      <% end %>
    </ul>
  </div>

  <%= render '/refinery/admin/form_actions', :f => f,
              :continue_editing => false,
              :delete_title => t('delete', :scope => 'refinery.menus.admin.menus.menu'),
              :delete_confirmation => t('message', :scope => 'refinery.admin.delete', title: @menu.title) %>
<% end %>
